// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.ai.states;

import java.util.HashMap;
import zombie.ai.State;
import zombie.characters.IsoGameCharacter;
import zombie.characters.IsoZombie;

public final class ZombieTurnAlerted extends State {
    private static final ZombieTurnAlerted _instance = new ZombieTurnAlerted();
    public static final Integer PARAM_TARGET_ANGLE = 0;

    public static ZombieTurnAlerted instance() {
        return _instance;
    }

    @Override
    public void enter(IsoGameCharacter owner) {
        HashMap hashMap = owner.getStateMachineParams(this);
        float _float = (Float)hashMap.get(PARAM_TARGET_ANGLE);
        owner.getAnimationPlayer().setTargetAngle(_float);
    }

    @Override
    public void execute(IsoGameCharacter owner) {
    }

    @Override
    public void exit(IsoGameCharacter owner) {
        owner.pathToSound(owner.getPathTargetX(), owner.getPathTargetY(), owner.getPathTargetZ());
        ((IsoZombie)owner).alerted = false;
    }

    public void setParams(IsoGameCharacter owner, float targetAngle) {
        HashMap hashMap = owner.getStateMachineParams(this);
        hashMap.clear();
        hashMap.put(PARAM_TARGET_ANGLE, targetAngle);
    }
}
